<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
<div class="box-body">
        <form id="myform" class="myform form-horizontal"  method="post" load="no">
          <div class="row tab-config">
            <div class="col-md-12">
        {foreach $addon.config as $item}  
             {switch $item.type}
             {case string}
               <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->             
               <input type="text" name="row[{$item.name}]" value="{$item.value}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}" {$item.extend} />
               
              {/case}
              {case text}
                <div class="input-group margin" id="{$item['name']}">
               <div class="input-group-btn">
               <span class="btn btn-default form-txt" style=" position:absolute;top:0px;">{$item.title}：</span>
                  <span class="form-txt-hide"></span>
                  </div>
                <!-- /btn-group -->             
              <textarea name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}" {$item.extend}>{$item.value}</textarea>
              {/case}
                            {case datetime}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            <input type="text" name="row[{$item.name}]" value="{$item.value}" class="form-control datetimepicker" data-tip="{$item.tip}" data-rule="{$item.rule}" {$item.extend} />
                            {/case}
                            {case number}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            <input type="number" name="row[{$item.name}]" value="{$item.value}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}" {$item.extend} />
                            {/case}
                            {case checkbox}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            {foreach name="item.content" item="vo"}
                            <label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value"}checked{/in} /> {$vo}</label>
                            {/foreach}
                            {/case}
                            {case radio}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            {foreach name="item.content" item="vo"}
                            <label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value"}checked{/in} /> {$vo}</label>
                            {/foreach}
                            {/case}
                            {case value="select" break="0"}{/case}
                            {case value="selects"}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            <select name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control select2" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
                                {foreach name="item.content" item="vo"}
                                <option value="{$key}" {in name="key" value="$item.value"}selected{/in}>{$vo}</option>
                                {/foreach}
                            </select>
                            {/case}              
                {case value="image" break="0"}{/case}
                            {case value="images"}
                                           <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            <div class="form-inline">
                                <input id="c-{$item.name}" class="form-control" size="37" name="row[{$item.name}]" type="text" value="{$item.value}" data-tip="{$item.tip}">
                                <span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i>上传</button></span>
                                <span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> 关闭</button></span>
                                <ul class="row list-inline plupload-preview" id="p-{$item.name}"></ul>
                            </div>
                            {/case}
               {case bool}
                              <div class="input-group margin">
                <div class="input-group-btn">
                  <span  class="btn btn-default form-txt">{$item.title}：</span>
                </div>
                <!-- /btn-group -->  
                            <label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> 是</label> 
                            <label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" />否</label>
               {/case}
{/switch}



          </div>
        {/foreach}                                                  
            </div>          
          </div>
          <!-- /.row -->
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</form>
</div>
<!-- /.box-body -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.config();
});	
</script>
</body>
</html>
